package cn.chencq.moudle.lottery.service;

import java.util.List;

import com.alibaba.fastjson.JSONObject;

import cn.chencq.moudle.lottery.entity.Lottery;
import cn.chencq.moudle.sys.service.BaseService;

public interface LotteryService extends BaseService<Lottery> {

	/**
	 * 
	 * @Title: batchSaveOrUpdate
	 * @Description: 批量更新或者插入操作
	 * @param list void
	 */
	void batchSaveOrUpdate(List<Lottery> list);

	/**
	 * 
	 * @Title: syncData
	 * @Description: 爬取数据
	 * @param startTime
	 * @param endTime
	 * @param lotteryType
	 * @return long
	 */
	long syncData(String startTime, String endTime, String lotteryType);

	/**
	 * 
	 * @Title: queryByDate
	 * @Description: 按日期查询彩票数据
	 * @param lotteryDate 日期格式 yyyy-MM-dd
	 * @param lotteryType
	 * @return List<Lottery>
	 */
	List<Lottery> queryByDate(String lotteryDate, String lotteryType);

	JSONObject predict(String lotteryType, String lotteryId);

	int[] getPredictNumber(double[][] trainData, double[][] targetData);
}
